package com.xxxx.springboot.shiro.config;

import java.util.Properties;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;

@Configuration
@MapperScan(basePackages = "com.xxxx.db.mapper*")
public class MybatisPlusConfig {
	/**
	 * 打印 sql
	 */
	@Bean
	public PerformanceInterceptor performanceInterceptor() {
		PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
		// 格式化sql语句
		Properties properties = new Properties();
		properties.setProperty("format", "false");
		performanceInterceptor.setProperties(properties);
		return performanceInterceptor;
	}
}